

var obj = {
  list: `
    $('.xing_vb ul li').each(function(index, item) {
      let vodName = $(item).find('.xing_vb4').text()
      let vodUrl = $(item).find('.xing_vb4 a').attr('href')
      let vodType = $(item).find('.xing_vb5').text()
      let vodDate = $(item).find('.xing_vb7').text()
      if (vodName) {
        let data = {
          _id: uuid.generate(),
          vodName,
          vodUrl,
          vodType,
          vodDate
        }
        listData.list.push(data)
      }
    })
  `,
  detail: `
    let poster = $('.vodBox img').attr('src')
    let name = $('.vodBox .vodh h2').text() + $('.vodBox .vodh span').text()
    let douban = $('.vodBox .vodh label').text()
    let alias =$('.vodBox .vodinfobox li').eq(0).text()
    let director = $('.vodBox .vodinfobox li').eq(1).text()
    let starring = $('.vodBox .vodinfobox li').eq(2).text()
    let categories = $('.vodBox .vodinfobox li').eq(3).text()
    let area =$('.vodBox .vodinfobox li').eq(4).text()
    let lang =$('.vodBox .vodinfobox li').eq(5).text()
    let release =$('.vodBox .vodinfobox li').eq(6).text()
    let date =$('.vodBox .vodinfobox li').eq(7).text()
    let introduction = $('.playBox').eq(0).children('.vodplayinfo').text()
    console.log($("title").text());
    let links = []
    $('.playBox').eq(1).find('ul').eq(1).children('li').each(function(index, item) {
      links.push($(item).text())
    })
    data = {
      _id: res.options.id,
      poster,
      name,
      douban,
      director,
      starring,
      categories,
      area,
      lang,
      release,
      date,
      alias,
      introduction,
      links
    }
  `
 }

module.exports = obj